<%--
  Created by IntelliJ IDEA.
  User: hasee
  Date: 2018/4/27
  Time: 21:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>session统计次数</title>
</head>
<body>
    <%
        int n = 0;
        String counter =(String)session.getAttribute("counter");
        if (counter!=null)
            n = Integer.parseInt(counter);
        n+=1;
        counter = String.valueOf(n);
        session.setAttribute("counter",counter);
        out.print("页面被访问次数："+ n +"");
    %>
</body>
</html>
